package com.itheima.chapter09.io.bytestream;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

//复制文件  数组
public class CaseDemo4 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("D:\\my_project\\a.txt");
        FileOutputStream fos = new FileOutputStream("MyIdeaTest\\aaa\\copyshuzu.txt");
        byte[] bys =new byte[1024];
        int len;
        while ((len = fis.read(bys)) != -1) {
            fos.write(bys, 0, len);
        }
        fis.close();
        fos.close();
    }
}
